package k8ssvc

import (
	"context"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	typeV1 "k8s.io/api/apps/v1"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
)

type deploymentAdapter struct {
	clientSet *kubernetes.Clientset
	config    *rest.Config
	ctx       context.Context
	deployment typeV1.Deployment
}

func (m deploymentAdapter) Delete() error {
	return m.clientSet.AppsV1().Deployments(m.deployment.Namespace).Delete(m.ctx, m.deployment.Name, metav1.DeleteOptions{})
}

func (m deploymentAdapter) Exec(args ...string) (string, error) {
	return "", nil
}

func (m deploymentAdapter) GetData() typeV1.Deployment {
	return m.deployment
}
